<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增类目')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-wxCategory-add">
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">类目：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <select name="categoryType" class="form-control m-b">-->
<!--                        <option value="">所有</option>-->
<!--                    </select>-->
<!--                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">类目名称：</label>
                <div class="col-sm-8">
                    <input name="categoryName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">就餐开始时间：</label>
                <div class="col-sm-8">
                    <input type="text" name="starttime" class="form-control" id="laydate-demo-3" placeholder="HH:mm:ss">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">就餐结束时间：</label>
                <div class="col-sm-8">
                    <input type="text" name="endtime" class="form-control" id="laydate-demo-4" placeholder="HH:mm:ss">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">就餐金额：</label>
                <div class="col-sm-8">
                    <input name="repastMoney" class="form-control" oninput = "value=value.replace(/[^\d]/g,'')" type="text">
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />

    <script type="text/javascript">
        var prefix = ctx + "wechatprogram/wxCategory";

        $(function(){
            $("#datetimepicker-demo-3").datetimepicker({
                format: "hh:ii:ss",
                autoclose: true
            });
            layui.use('laydate', function() {
                var laydate = layui.laydate;
                laydate.render({
                    elem: '#laydate-demo-3',
                    type: 'time',
                    trigger: 'click'
                });
            });
        });

        $(function(){
            $("#datetimepicker-demo-4").datetimepicker({
                format: "hh:ii:ss",
                autoclose: true
            });
            layui.use('laydate', function() {
                var laydate = layui.laydate;
                laydate.render({
                    elem: '#laydate-demo-4',
                    type: 'time',
                    trigger: 'click'
                });
            });
        });

        $("#form-wxCategory-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-wxCategory-add').serialize());
            }
        }




    </script>
</body>
</html>